<% layout('/layouts/default.html', {title: '待付款订单列表', libs: ['dataGrid']}){ %>
<div class="main-content">


	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('会员卡订单列表')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
			
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${ztCardOrder}" action="${ctx}/memOrder/listselfData" method="post" class="form-inline hide"

					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">

				<div class="form-group">
					<label class="control-label">${text('支付状态')}：</label>
					<div class="control-inline width-120">
						<#form:select path="orderstatus" dictType="zt_order_type" blankOption="true" class="form-control"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('订单号')}：</label>
					<div class="control-inline">
						<#form:input path="order" maxlength="200" class="form-control width-120"/>
					</div>
				</div>
				<#form:hidden path="ztAdmin.id"/>
				
				
				<div class="form-group">

					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>

					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>

				</div>

			</#form:form>

			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>

// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [     
		{header:'${text('微信名')}', name:'ztAdmin.name',index:'u10.name',  width:150, align:"center"},  	
		{header:'${text('订单号')}', name:'order',index:'a.order',  width:220, align:"center"},
		
		{header:'${text('会员卡名')}', name:'ztCard.name',index:'z.name',  width:120, align:"center"},
		
		{header:'${text('余额')}', name:'balance',index:'a.balance', width:105, align:"center"},
		{header:'${text('付款金额')}', name:'price', index:'a.origPrice', width:130, align:"center"},
		{header:'${text('总价格')}', name:'totalPrice', width:105, align:"center"},
		
		{header:'${text('下单时间')}', name:'orderTime', index:'a.order_time', width:190, align:"center"},
		
		{header:'${text('支付时间')}', name:'payTime', index:'a.pay_time', width:190, align:"center"},
		
		{header:'${text('状态')}', name:'orderstatus', index:'a.orderstatus', width:75, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel(${@DictUtils.getDictListJson('zt_orde_type')}, val, '${text('待付款')}', true);
		}}
		
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>